const mongoose = require("./db");

const userSchema = new mongoose.Schema({
  userId: {type:String},
  username: { type:String, required: true},
  password: { type: String },
  sex: {type:String},
  age: {type:Number},
  tel: {type:String},
  hobby: {type:Array},
  power: {type:Number},    // 0普通，1管理
  avatar: {type:String}
});

module.exports = mongoose.model("user", userSchema);
